'''
offer再见
'''
# -*- coding:utf-8 -*-
class Solution:
    # 返回[a,b] 其中ab是出现一次的两个数字
    def FindNumsAppearOnce(self, array):
        # write code here
        res = []
        for i in array:
            if array.count(i) == 1:
                res.append(i)
        return res
'''
offer再也不见
'''
# -*- coding:utf-8 -*-
class Solution:
    # 返回[a,b] 其中ab是出现一次的两个数字
    def FindNumsAppearOnce(self, array):
        # write code here
        return filter(lambda x:array.count(x)==1, array)
'''
剑指offer
n^0 = n;
n^n = 0;
n^n^m = n^(n^m) 满***换律

理解不了
动态数组
'''
# -*- coding:utf-8 -*-
class Solution:
    # 返回[a,b] 其中ab是出现一次的两个数字
    def FindNumsAppearOnce(self, array):
        # write code here
        if not array:
            return []
        res = []
        for i in array:
            if i in res:
                res.remove(i)
            else:
                res.append(i)
        return res